using System;
using Server.Items;
using Server.Mobiles;
using Server.Spells;

namespace Server.Mobiles
{
    public class MageTrainer : Trainer
    {
        [Constructable]
        public MageTrainer(): base(AIType.AI_Mage, FightMode.Closest, 15, 1, 0.2, 0.6)
        {
            // A Dummy Nox or Pure Mage
            int iHue = 20 + Team * 40;
            int jHue = 25 + Team * 40;

            // Skills and Stats
            this.InitStats(90, 90, 125);
            this.Skills[SkillName.Magery].Base = 120;
            this.Skills[SkillName.EvalInt].Base = 120;
            this.Skills[SkillName.Inscribe].Base = 100;
            this.Skills[SkillName.Wrestling].Base = 120;
            this.Skills[SkillName.Meditation].Base = 120;
            this.Skills[SkillName.Poisoning].Base = 100;

            // Name
            this.Name = "Nox Mage";

            // Equip
            Spellbook book = new Spellbook();
            book.Movable = false;
            book.LootType = LootType.Newbied;
            book.Content = 0xFFFFFFFFFFFFFFFF;
            AddItem(book);

            Kilt kilt = new Kilt();
            kilt.Hue = jHue;
            AddItem(kilt);

            Sandals snd = new Sandals();
            snd.Hue = iHue;
            snd.LootType = LootType.Newbied;
            AddItem(snd);

            SkullCap skc = new SkullCap();
            skc.Hue = iHue;
            AddItem(skc);

            // Spells
            AddSpellAttack(typeof(Spells.First.MagicArrowSpell));
            AddSpellAttack(typeof(Spells.First.WeakenSpell));
            AddSpellAttack(typeof(Spells.Third.FireballSpell));
            AddSpellDefense(typeof(Spells.Third.WallOfStoneSpell));
            AddSpellDefense(typeof(Spells.First.HealSpell));
        }

        public MageTrainer(Serial serial): base(serial)
        {
        }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);

            writer.Write((int)0); // version
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();
        }
    }
}
